package com.gqz.equip.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gqz.common.core.domain.R;
import com.gqz.common.core.domain.RequestForm;
import com.gqz.equip.vo.EnWzKfglVo;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


/**
 * 库房信息表
 *
 * @author gqz20
 * @date 2023/02/25
 */
@RequestMapping("/en-wz-kfgl")
public interface EnWzKfglApi {
    @PostMapping("/{id}")
    public R<List<EnWzKfglVo>> getById(
            @PathVariable("id") String id);

    @PostMapping("/page")
    public R<Page<EnWzKfglVo>> page(
            @RequestBody RequestForm<EnWzKfglVo> requestForm);

    @PostMapping("/count")
    public R<Long> count(
            @RequestBody RequestForm<EnWzKfglVo> requestForm);

    @PostMapping("/insert")
    public R<Integer> insert(
            @RequestBody List<EnWzKfglVo> forms);

    @PostMapping("/update")
    public R<Integer> update(
            @RequestBody List<EnWzKfglVo> forms);

    @PostMapping("/delete")
    public R<Boolean> delete(
            @RequestBody List<String> ids);

    /**
     * 通过dwbm获取
     *
     * @param dwbm 数据仓库管理
     * @return {@link R}<{@link List}<{@link EnWzKfglVo}>>
     */
    @PostMapping("/dwbm/{dwbm}")
    public R<List<EnWzKfglVo>> getByDwbm(
            @PathVariable("dwbm") String dwbm);

    /**
     * 库房信息表
     *
     * @return {@link R}<{@link List}<{@link EnWzKfglVo}>>
     */
    @PostMapping("/getKfList")
    public R<List<EnWzKfglVo>> getKfList();

}
